#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <pthread.h>

typedef struct {
	int age;
	char name[64];
}stu;

void* do_thread_function(void *arg){
	printf("%d %s\n",((stu*)arg)->age,((stu*)arg)->name);
	static stu s={16,"zdx"};
	pthread_exit((void*)&s);
}

int main(){
	pthread_t thread;
	stu st={18,"yujiu"};
	int ret= pthread_create(&thread,NULL,do_thread_function,(void*)&st);
	if(ret!=0){
		perror("pthread_create:");
		exit(1);
	}
	stu* s=NULL;
	pthread_join(thread,(void *)&s);
	printf("%d %s\n",s->age,s->name);
	return 0;
}
